﻿using System;
using System.Collections.ObjectModel;
using JTLeigh.Commerce.Spencer.Core.Common.Entities;

namespace JTLeigh.Commerce.Spencer.Core.Business
{

	/// <summary>
	/// Delegate used to retrieve a collection of disassociations by category identifier.
	/// </summary>
	/// <typeparam name="TDisassociation">A disassociation class inheriting from <see cref="DisassociationBase"/>.</typeparam>
	/// <param name="categoryId">The category identifier <see cref="String"/> of the category whose
	/// disassociations are to be returned.</param>
	/// <returns>A <see cref="Collection{TEntry}"/> of <typeparamref name="TDisassociation"/> keyed 
	/// by disassociated item identifier <see cref="Guid"/>.</returns>
	public delegate Collection<TDisassociation> GetCategoryDisassociations<TDisassociation>(string categoryId)
		where TDisassociation : DisassociationBase;

}
